<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php e($html->charset()); ?>
<title><?php __($sitename); e(' &rsaquo; '); __($title_for_layout); ?></title>
<?php
  if (is_array($stylesheet)) {
      foreach ($stylesheet as $css) {
          e($html->css($css));
      }
  }
?>
</head>
<body>

<div>
  <div class="header">
    <div id="backtoblog"><a href="<?php e($this->base); ?>/index.php"><span style="font-size:18px;">&larr;</span> Back to Homepage</a></div>
  </div>
  <div class="body" style="width:1200px;">
    <div class="mainmenu fLeft" style="padding:5px;">
      <div style="font-weight:bold; margin-bottom:5px;">main menu</div>
<?php if ($session->check('Admin.logged')) { ?>
      <div style="border:1px solid #e3e3e3; -moz-border-radius:8px; -webkit-border-radius:8px;">
        <a href="<?php e($this->base); ?>/admin/members" class="mainmenu split"><?php __('Member'); ?></a>
        <a href="<?php e($this->base); ?>/admin/products" class="mainmenu split"><?php __('Price List'); ?></a>
        <a href="<?php e($this->base); ?>/admin/stockists" class="mainmenu split"><?php __('Stockist'); ?></a>
        <a href="<?php e($this->base); ?>/admin/stocks" class="mainmenu split"><?php __('Stock'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales" class="mainmenu split"><?php __('POS'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/manage" class="mainmenu split"><?php __('Order'); ?></a>
        <a href="<?php e($this->base); ?>/admin/members/genealogy" class="mainmenu split"><?php __('Genealogy Tree'); ?></a>
        <a href="<?php e($this->base); ?>/admin/members/tree" class="mainmenu split"><?php __('Members Tree'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/monthly_report" class="mainmenu split"><?php __('Monthly Sales Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/order_report" class="mainmenu split"><?php __('Order Report (Offline)'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/statistic_report" class="mainmenu split"><?php __('Statistic Report (Account)'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/inventory_report" class="mainmenu split"><?php __('Inventory Sales Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/weekly_bonus_report" class="mainmenu split"><?php __('Weekly Bonus Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/top_bv_purchase_report" class="mainmenu split"><?php __('Top BV Purchase Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/1st_gen_sponsored_bv_report" class="mainmenu split"><?php __('1st Generation Sponsored BV Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/top_sales_report" class="mainmenu split"><?php __('Top Sales Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/new_member_club_report" class="mainmenu split"><?php __('New Member Club Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/payout_report" class="mainmenu split"><?php __('Payout Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/sales/bonus_payout_report" class="mainmenu split"><?php __('Bonus Payout Report'); ?></a>
        <a href="<?php e($this->base); ?>/admin/members/logout" class="mainmenu"><?php __('Logout'); ?></a>
      </div>
<?php } ?>
    </div>
    <div class="content fLeft">
<?php if ($session->check('Message.flash') || $session->check('Message.auth')) { ?>
      <div id="messageBox" style="margin-bottom:5px;"><?php $session->flash().$session->flash('auth'); ?></div>
      <div class="clear"></div>
<?php } else if ($session->check('Message.email')) { ?>
      <div id="messageBox" style="margin-bottom:5px;"><?php $session->flash('email'); ?></div>
      <div class="clear"></div>
<?php } ?>
<?php e($content_for_layout); ?>
    </div>
    <div class="clear"></div>
  </div>
  <div class="footer">
<?php
      $copyright = $html->link('&copy;', '/', array('style'=>'background-color:transparent;'), false, false);
      e(r(
          array('%copyright%', '%date%', '%sitename%', '%version%'),
          array($copyright, date('Y'), __($sitename,true), '1.0'),
          __('Copyright %copyright% %date% %sitename% %version% &trade;. All rights reserved.', true)
      ));
?>
  </div>
</div>
<?php
  if (is_array($javascripts)) {
      foreach ($javascripts as $js) {
          e($javascript->link($js));
      }
  }
?>

<script type="text/javascript"><?php e($scripts_for_layout); ?></script>
<div style="color:#ccc;">
  <?php e($cakeDebug); ?>
</div>
</body>
</html>